Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OTA] Send more useful StatusReport errors during download failures #15227

Merged

Conversation

carol-apple
Copy link
Contributor

Problem

When an OTA provider supplies an image without a proper header, the logging is very vague that this has occurred. Also, the StatusReport received on the provider side is for Unknown but this error could be more descriptive.

Fixes: #15219

Change overview

  • Add logging to point out that a transfer failed due to an image missing header
  • Pass more useful StatusReport error when transfer fails because of missing header or because of failure to write
  • Update the StatusCode enum to match the spec

Testing

  • Verified that basic file transfer works
  • Verified that when an image without a header is supplied, the appropriate error is logged and the StatusReport error reflects the error

@github-actions
Copy link

github-actions bot commented Feb 16, 2022

PR #15227: Size comparison from 3624b26 to 6a49a20

Increases (10 builds for cyw30739, efr32, k32w, linux, nrfconnect, qpg)
platform target config section 3624b26 6a49a20 change % change
cyw30739 ota-requestor cyw930739m2evb_01 (read/write) 573302 573322 20 0.0
.app_xip_area 471036 471056 20 0.0
efr32 lighting-app BRD4161A (read only) 912692 912756 64 0.0
.text 912684 912748 64 0.0
BRD4161A+rpc (read only) 941416 941448 32 0.0
.text 941408 941440 32 0.0
k32w light k32w061+release (read/write) 688280 688312 32 0.0
.text 603860 603892 32 0.0
linux ota-requestor-app debug (read only) 1880217 1880393 176 0.0
.rodata 152956 152988 32 0.0
.text 1578082 1578226 144 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1018739 1018771 32 0.0
text 698008 698032 24 0.0
nrf52840dk_nrf52840+rpc (read/write) 988035 988067 32 0.0
text 677908 677932 24 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 925446 925478 32 0.0
text 613024 613044 20 0.0
qpg lighting-app qpg6105+debug (read only) 597476 597500 24 0.0
.text 592156 592180 24 0.0
lock-app qpg6105+debug (read only) 563084 563124 40 0.0
.text 557764 557804 40 0.0
Full report (43 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 3624b26 6a49a20 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 594286 594286 0 0.0
.app_xip_area 499884 499884 0 0.0
.bss 77100 77100 0 0.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 552230 552230 0 0.0
.app_xip_area 459396 459396 0 0.0
.bss 75572 75572 0 0.0
.data 608 608 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 573302 573322 20 0.0
.app_xip_area 471036 471056 20 0.0
.bss 84676 84676 0 0.0
.data 552 552 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 912692 912756 64 0.0
(read/write) 127432 127432 0 0.0
.bss 125400 125400 0 0.0
.data 2032 2032 0 0.0
.text 912684 912748 64 0.0
BRD4161A+rpc (read only) 941416 941448 32 0.0
(read/write) 144352 144352 0 0.0
.bss 142176 142176 0 0.0
.data 2172 2172 0 0.0
.text 941408 941440 32 0.0
window-app BRD4161A (read only) 846576 846576 0 0.0
(read/write) 125328 125328 0 0.0
.bss 123424 123424 0 0.0
.data 1900 1900 0 0.0
.text 846568 846568 0 0.0
esp32 all-clusters-app c3devkit (read only) 946458 946458 0 0.0
(read/write) 1398882 1398882 0 0.0
.dram0.bss 66248 66248 0 0.0
.dram0.data 14268 14268 0 0.0
.flash.rodata 199464 199464 0 0.0
.flash.text 946458 946458 0 0.0
.iram0.text 62056 62056 0 0.0
m5stack (read only) 996263 996263 0 0.0
(read/write) 464144 464144 0 0.0
.dram0.bss 71392 71392 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 226560 226560 0 0.0
.flash.text 990879 990879 0 0.0
.iram0.text 123399 123399 0 0.0
k32w light k32w061+release (read/write) 688280 688312 32 0.0
.bss 76712 76712 0 0.0
.data 1908 1908 0 0.0
.text 603860 603892 32 0.0
lock k32w061+release (read/write) 690928 690928 0 0.0
.bss 76928 76928 0 0.0
.data 1948 1948 0 0.0
.text 606252 606252 0 0.0
linux all-clusters-app debug (read only) 2364721 2364721 0 0.0
(read/write) 141792 141792 0 0.0
.bss 56320 56320 0 0.0
.data 1296 1296 0 0.0
.data.rel.ro 78504 78504 0 0.0
.dynamic 592 592 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 206149 206149 0 0.0
.text 1996226 1996226 0 0.0
bridge-app debug+rpc (read only) 1728493 1728493 0 0.0
(read/write) 85672 85672 0 0.0
.bss 40400 40400 0 0.0
.data 2034 2034 0 0.0
.data.rel.ro 38080 38080 0 0.0
.dynamic 592 592 0 0.0
.got 3976 3976 0 0.0
.init 27 27 0 0.0
.init_array 560 560 0 0.0
.rodata 141868 141868 0 0.0
.text 1470005 1470005 0 0.0
chip-tool debug (read only) 8575541 8575541 0 0.0
(read/write) 245952 245952 0 0.0
.bss 31816 31816 0 0.0
.data 1184 1184 0 0.0
.data.rel.ro 206896 206896 0 0.0
.dynamic 608 608 0 0.0
.got 4792 4792 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 459541 459541 0 0.0
.text 7599509 7599509 0 0.0
chip-tool-ipv6only arm64 (read only) 8328452 8328452 0 0.0
(read/write) 353745 353745 0 0.0
.bss 50113 50113 0 0.0
.data 1216 1216 0 0.0
.data.rel.ro 249368 249368 0 0.0
.dynamic 560 560 0 0.0
.got 49256 49256 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 435500 435500 0 0.0
.text 7130276 7130276 0 0.0
door-lock-app debug (read only) 1933793 1933793 0 0.0
(read/write) 111576 111576 0 0.0
.bss 43088 43088 0 0.0
.data 1010 1010 0 0.0
.data.rel.ro 62080 62080 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 173330 173330 0 0.0
.text 1611874 1611874 0 0.0
lighting-app debug+rpc (read only) 2059985 2059985 0 0.0
(read/write) 116920 116920 0 0.0
.bss 44192 44192 0 0.0
.data 1400 1400 0 0.0
.data.rel.ro 65832 65832 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 165905 165905 0 0.0
.text 1739266 1739266 0 0.0
ota-provider-app debug (read only) 1867193 1867193 0 0.0
(read/write) 107320 107320 0 0.0
.bss 42976 42976 0 0.0
.data 1224 1224 0 0.0
.data.rel.ro 57480 57480 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 158155 158155 0 0.0
.text 1558354 1558354 0 0.0
ota-requestor-app debug (read only) 1880217 1880393 176 0.0
(read/write) 108736 108736 0 0.0
.bss 43392 43392 0 0.0
.data 1160 1160 0 0.0
.data.rel.ro 58744 58744 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 632 632 0 0.0
.rodata 152956 152988 32 0.0
.text 1578082 1578226 144 0.0
shell debug (read only) 2346281 2346281 0 0.0
(read/write) 144592 144592 0 0.0
.bss 64896 64896 0 0.0
.data 832 832 0 0.0
.data.rel.ro 73192 73192 0 0.0
.dynamic 592 592 0 0.0
.got 4168 4168 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 207026 207026 0 0.0
.text 1982402 1982402 0 0.0
thermostat-no-ble arm64 (read only) 2153292 2153292 0 0.0
(read/write) 141825 141825 0 0.0
.bss 58641 58641 0 0.0
.data 1032 1032 0 0.0
.data.rel.ro 75024 75024 0 0.0
.dynamic 560 560 0 0.0
.got 4160 4160 0 0.0
.init 24 24 0 0.0
.init_array 328 328 0 0.0
.rodata 133052 133052 0 0.0
.text 1801936 1801936 0 0.0
tv-app debug (read only) 2531289 2531289 0 0.0
(read/write) 142560 142560 0 0.0
.bss 60320 60320 0 0.0
.data 3200 3200 0 0.0
.data.rel.ro 73008 73008 0 0.0
.dynamic 592 592 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 888 888 0 0.0
.rodata 197669 197669 0 0.0
.text 2160578 2160578 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2399208 2399208 0 0.0
.bss 188252 188252 0 0.0
.data 5320 5320 0 0.0
.text 1361808 1361808 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2361568 2361568 0 0.0
.bss 180864 180864 0 0.0
.data 5624 5624 0 0.0
.text 1324168 1324168 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2325032 2325032 0 0.0
.bss 180752 180752 0 0.0
.data 5600 5600 0 0.0
.text 1287632 1287632 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139648 1139648 0 0.0
.bss 11756 11756 0 0.0
.data 4368 4368 0 0.0
.text 103032 103032 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2314092 2314092 0 0.0
.bss 178044 178044 0 0.0
.data 5432 5432 0 0.0
.text 1276664 1276664 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 1018739 1018771 32 0.0
bss 121460 121460 0 0.0
rodata 120368 120368 0 0.0
text 698008 698032 24 0.0
nrf52840dk_nrf52840+rpc (read/write) 988035 988067 32 0.0
bss 118648 118648 0 0.0
rodata 111896 111896 0 0.0
text 677908 677932 24 0.0
nrf52840dongle_nrf52840 (read/write) 1033703 1033703 0 0.0
bss 122680 122680 0 0.0
rodata 119184 119184 0 0.0
text 701916 701916 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 925446 925478 32 0.0
bss 118024 118024 0 0.0
rodata 113608 113608 0 0.0
text 613024 613044 20 0.0
lock-app nrf52840dk_nrf52840 (read/write) 947459 947459 0 0.0
bss 119664 119664 0 0.0
rodata 109064 109064 0 0.0
text 640216 640216 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 854986 854986 0 0.0
bss 116256 116256 0 0.0
rodata 102236 102236 0 0.0
text 556008 556008 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 527595 527595 0 0.0
bss 53632 53632 0 0.0
rodata 49976 49976 0 0.0
text 361016 361016 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 946035 946035 0 0.0
bss 119384 119384 0 0.0
rodata 108016 108016 0 0.0
text 640036 640036 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 941999 941999 0 0.0
bss 119388 119388 0 0.0
rodata 107716 107716 0 0.0
text 636276 636276 0 0.0
shell nrf52840dk_nrf52840 (read/write) 807447 807447 0 0.0
bss 111236 111236 0 0.0
rodata 79132 79132 0 0.0
text 539384 539384 0 0.0
p6 all-clusters-app default (read/write) 2484440 2484440 0 0.0
.bss 117608 117608 0 0.0
.data 2672 2672 0 0.0
.text 1442704 1442704 0 0.0
light-app default (read/write) 2391304 2391304 0 0.0
.bss 107248 107248 0 0.0
.data 2520 2520 0 0.0
.text 1349568 1349568 0 0.0
lock-app default (read/write) 2354752 2354752 0 0.0
.bss 106976 106976 0 0.0
.data 2480 2480 0 0.0
.text 1313016 1313016 0 0.0
qpg lighting-app qpg6105+debug (read only) 597476 597500 24 0.0
(read/write) 146936 146936 0 0.0
.bss 89072 89072 0 0.0
.data 1108 1108 0 0.0
.text 592156 592180 24 0.0
lock-app qpg6105+debug (read only) 563084 563124 40 0.0
(read/write) 146936 146936 0 0.0
.bss 89056 89056 0 0.0
.data 1060 1060 0 0.0
.text 557764 557804 40 0.0
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 877166 877166 0 0.0
bss 88600 88600 0 0.0
noinit 37160 37160 0 0.0
text 616812 616812 0 0.0

@andy31415 andy31415 merged commit e5f4849 into project-chip:master Feb 17, 2022
jamesluo11 pushed a commit to jamesluo11/connectedhomeip that referenced this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more logging for error in OTA transfer using Linux apps
6 participants